/**
 * 
 */
package com.google.code.cisx.service;

import com.google.code.cisx.client.login.service.LoginService;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

import javax.servlet.ServletException;

/**
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id: LoginServiceImpl.java 100 2008-01-05 22:03:46Z
 *          rahul.thakur.xdev $
 */
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {

  /**
   * For serialization.
   */
  private static final long serialVersionUID = 574982237402475913L;

  /*
   * (non-Javadoc)
   * 
   * @see javax.servlet.GenericServlet#init()
   */
  public void init() throws ServletException {
    super.init();
    getServletContext().log("Starting " + getClass().getName());
  }

  /**
   * {@inheritDoc}
   * 
   * @see com.google.code.cisx.client.login.service.LoginService#login(java.lang.String,
   *      java.lang.String)
   */
  public String login(String username, String password) {
    // TODO Implement!
    if (username.equals("adminuser") && password.equals("admin"))
      return "Success";

    return "Failed";
  }

}
